package com.Excrises.Four;

public class Dog {
    String type;
    int age;
    String name;
    String emo;

    public String getType() {
        return type;
    }

    public int getAge() {
        return age;
    }

    public String getName() {
        return name;
    }

    public String getEmo() {
        return emo;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Dog(String type, int age, String name) {
        this.type = type;
        this.age = age;
        this.name = name;
    }

    public void setName(String name) {
            this.name = name;
    }

    public void setEmo(String emo) {
        this.emo = emo;
    }
    public void run(){
        if (emo.equals("心情好")){
            System.out.println("名字叫" + this.name + "的" + this.type + "心情很好，开心的围着主人身边转");
        }
        else
            System.out.println("名字叫" + this.name + "的" + this.type + "心情不好，伤心的一动不动");
    }

    public void bark(){
        if (emo.equals("心情好")){
            System.out.println("名字叫" + this.name + "的" + this.type + "心情很好，开心的哇哇叫");
        }
        else
            System.out.println("名字叫" + this.name + "的" + this.type + "心情不好，伤心的呜呜叫");
    }


}
